<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .panel {
      width: 300px;
      height: 180px;
      border: 20px solid #000;
      /* 上、右、下、左的宽度 */
      border-width: 51px 41px 25px 128px;
      border-image: url("./border.png") 51 41 25 128;
      /* 内减盒子模型 */
      box-sizing: border-box;

      position: relative;
    }

    .inner {
      position: absolute;
      left: -128px;
      top: -51px;
      right: -41px;
      bottom: -25px;

      padding: 20px;
    }
  </style>
</head>

<body>
  <div class="panel">
    <div class="inner">
      我是内容
    </div>
  </div>
</body>

</html>